Skip to content

fix: mask PIB after service labels and log noise (v2.6.7)#40

Merged
click0 merged 1 commit into
mainfrom
claude/refactor-data-masking-lIcWN
Jul 4, 2026
Merged

fix: mask PIB after service labels and log noise (v2.6.7)#40
click0 merged 1 commit into
mainfrom
claude/refactor-data-masking-lIcWN

Conversation

@click0

@click0 click0 commented Jul 4, 2026

Copy link
Copy Markdown
Owner

PIB after service labels / log noise was not masked

In lines like ПІБ: Петренко Іван Васильович or data-ipn log lines
… ІПН=3698521592 — ПІБ «138» → «Міронов Андрій Петрович» …, the real name was skipped. The PIB anchor latched onto the first uppercase token — ІПН=3698521592 — and stopped, or onto the marker ПІБ, never reaching the actual name after .

Fix

  • is_pib_anchor strips trailing punctuation (so ПІБ: matches the exclude list) and rejects tokens containing digits or = (so ІПН=…, «138» are not treated as names).
  • ПІБ / звання added as excluded service markers.

Now both the log format and the common ПІБ: … / звання: … document formats mask correctly; IPNs still masked; roundtrip verified.

Known limitation (documented)

A bare rank with no following PIB (звання «…» → «молодший сержант») is still not masked — long-standing behavior avoiding false positives on rank words in prose, independent of this change.

Test plan

  • 454 tests pass (+3: ПІБ: label, data-ipn log roundtrip, ІПН= not-an-anchor)

https://claude.ai/code/session_01XT6iUWaQgahXDB9TWX9Bq7


Generated by Claude Code

…6.7)

In 'ПІБ: Петренко...' and data-ipn log lines the real name was skipped:
the PIB anchor latched onto 'ІПН=NNNN' (uppercase start) or the marker
'ПІБ', then stopped before the actual name. is_pib_anchor now strips
trailing punctuation and rejects tokens with digits/'='; 'ПІБ'/'звання'
are excluded markers. +3 tests. Bare rank without PIB still unmasked
(documented known limitation).

https://claude.ai/code/session_01XT6iUWaQgahXDB9TWX9Bq7
@click0 click0 merged commit 3d4d540 into main Jul 4, 2026
1 check passed
@click0 click0 deleted the claude/refactor-data-masking-lIcWN branch July 4, 2026 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants